﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="KJSTools.aspx.cs" Inherits="Testify.Tools.KJSTools" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="lblErrorMsg" runat="server" />

    <asp:UpdatePanel ID="udatepanel1" runat="server">
        <ContentTemplate>
            <br />
            <asp:Label ID="Label1" Text="Time Remaining: " runat="server" />
            <asp:Label ID="lblTimer" Text="60" runat="server" />
            <asp:Timer ID="Timer1" OnTick="Tick" runat="server" Interval="1000" Enabled="True">
            </asp:Timer>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick"  />
        </Triggers>
    </asp:UpdatePanel>
    <asp:Repeater ID="rptQuestion" runat="server" Visible="true" OnItemDatabound="rptQuestion_ItemDataBound" >
        <HeaderTemplate>
            <table cellpadding="4px">
                <tr style="background-color:#DEDEDE;">
                <th>
                    Question 1
                </th>
                <th>
                    Answer
                </th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
                <tr>
                <td>
                    <asp:TextBox ID="txtQuestion" runat="server" Text='<%# Eval("Question") %>' MaxLength="18" Width="150px" />
                </td><td>
                    <asp:TextBox ID="txtAnswer" runat="server" Text='<%# Eval("Answer") %>' MaxLength="18" Width="150px" AutoPostBack="true" OnTextChanged="updateRows" />
                </td>
                </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
                <tr style="background-color:#DEDEDE;">
                <td>
                    <asp:TextBox ID="txtQuestion" runat="server" Text='<%# Eval("Question") %>' MaxLength="18" Width="150px" />
                </td><td>
                    <asp:TextBox ID="txtAnswer" runat="server" Text='<%# Eval("Answer") %>' MaxLength="18" Width="150px" AutoPostBack="true" OnTextChanged="updateRows" />
                </td>
                </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <br />
    <asp:Button ID="btnSubmitTest" runat="server" Text="Submit Test" />
    <br />
    <asp:Label ID="lblInfo" ForeColor="Blue" runat="server" />

</asp:Content>
